<template>
	<view class="">
		<u-sticky>
		<view class="topSelect">
			<view class="input" @click="selectArea">
				<u-icon name="map" class="map" color="#509DED"></u-icon>
				<view class="cont">贵州省六盘水</view>
				<u-icon name="arrow-down" class="arrow-down" color="#509DED"></u-icon>
			</view>
			<u-select v-model="show" mode="mutil-column-auto" :list="list" @confirm="confirm"></u-select>
		
		 </view>
		 </u-sticky>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				show: false,
				list: [
									{
										value: 1,
										label: '中国',
										children: [
											{
												value: 2,
												label: '广东',
												children: [
													{
														value: 3,
														label: '深圳'
													},
													{
														value: 4,
														label: '广州'
													}
												]
											},
											{
												value: 5,
												label: '广西',
												children: [
													{
														value: 6,
														label: '南宁'
													},
													{
														value: 7,
														label: '桂林'
													}
												]
											}
										]
									},
									{
										value: 8,
										label: '美国',
										children: [
											{
												value: 9,
												label: '纽约',
												children: [
													{
														value: 10,
														label: '皇后街区'
													}
												]
											}
										]
									}
								]
			}
		},
			
		methods:{
			confirm(e) {
							console.log(e);
			},
			selectArea(){
				this.show=true
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.topSelect{
		
		height: 30px;
		background: #509DED;
		display: flex;
		justify-content: center;
		align-items: center;
		.input{
			height: 20px;
			width: 90%;
			background: white;
			border-radius: 6px;
			display: flex;
			justify-content: space-around;
				
			.map{
				width: 14%;
				margin-left: 10px;
				}
			.cont{
				width: 70%;
				line-height: 20px;
			}
			.arrow-down{
				width: 10%;
				display: flex;
				align-items: center;
			}
			
			
		}
	}
	
</style>